package org.masterview.user.client.ui;

import java.util.Comparator;

public class NumberComparator implements Comparator
{
    public int compare(Object o1, Object o2) {
        if (o1 instanceof Double) {
            return ((Double) o1).compareTo(((Double) o2));
        } else if (o1 instanceof Long) {
            return ((Long) o1).compareTo(((Long) o2));
        } else if (o1 instanceof Integer) {
            return ((Integer) o1).compareTo(((Integer) o2));
        } else {
            return -1;
        }
    }
}
